#!/bin/bash
cd `dirname $0`
TS=`date +%Y%m%d`
NICE=10
for i in 2 3 4 0 02; do
 if [ "$1" == "parallel" ]; then
  screen -d -m nice -n $NICE ./build-release $i $TS 
  echo "Started $i build with nice level $NICE"
  NICE=$((NICE-1))
  sleep 60
 else
  ./build-release $i $TS
 fi
done
